import { createBrowserRouter } from 'react-router-dom'
import Layout from "@/page/Layout/index.jsx";
import Month from "@/page/Month/index.jsx";
import Year from "@/page/Year/index.jsx";
import New from "@/page/New/index.jsx";

// import { Layout, Month, Year, New } from '@/router/lazyComponents'

const router = createBrowserRouter([
  {
    path: '/',
    element: <Layout />,
    redirect: '/month',
    children: [
      {
        index: true,
        element: <Month />,
        lazy: () => import('@/page/Month/index.jsx')
      },
      {
        path: 'year',
        element: <Year />
      }
    ]
  },
  {

    path: '/new',
    element: <New />
  }
])

export default router
